Repository navigation
fix(sdk): vote token decimals and governance spell deployments in the decoder - #53
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…uding the 2% and 1% redeployments and OPEN's spell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two governance fixes in one patch release.
Vote token decimals
Governance amounts used a fixed 18 decimals. A vote-lock vault on a token with other decimals (for example vlUSDC, 6 decimals) showed wrong values: quorum
0 of 0.00000000000003instead of0.03, voting power0.00instead of0.3, and delegates with0.00votes. Comparisons on raw values were correct; only the formatted values were wrong.voteTokenDecimalsfrom the subgraph vote token.getProposalStateuses it for the threshold amounts.decimals()of the vote token in the multicall they already make.getProposerStatewith a timepoint andgetProposalVotesadd one read when the caller does not passvoteTokenDecimals.GetIndexDtfDelegatesreads the token decimals.Governance spell deployments
The decoder knew only the first
GovernanceSpell_09_18_2026deployments. Proposals to the later spells showed "Unknown Contract" when the explorer ABI was not available (reported on reserve-protocol/register#1156).GovernanceSpell_10_21_2026on Ethereum.INDEX_DTF_GOVERNANCE_SPELL_09_18_2026_ADDRESSdoes not change.upgradeFolioandretireOldStakingVaultselectors of the spell ABI.Verification
test(518 passed),typecheck,lint,format:check,graphql:codegen:checkandbuildpass.0xbaad…682a): voter state reads 0.3, and a proposal reads quorum 0.03 with 0.3 votes.